package com.the_ring.behavior.state;

/**
 * @author: t22306139
 * @date: 2023/12/1  14:44
 */
public class StateA implements State{
    @Override
    public void stateA2B(StateContext context) {
        System.out.println("当前状态：" + context.getCurrent().name() + " 状态转为：" + StateEnum.B.name());
        context.setCurrent(StateEnum.B);
    }

    @Override
    public void stateB2C(StateContext context) {
        System.out.println("当前状态：" + context.getCurrent().name() + " 状态不匹配，无法转变！");
    }

    @Override
    public void stateC2B(StateContext context) {
        System.out.println("当前状态：" + context.getCurrent().name() + " 状态不匹配，无法转变！");
    }
}
